// JavaScript Document
function check()
{
	var cond=true;
	if(document.shipping.shiptitle.value.length==0)
	{
		alert("Please Enter Shipping Title.");
		if(cond==true)
		{
			document.shipping.shiptitle.focus();
		}
		cond=false;
		return false;
	}	
	if(document.shipping.shipdesc.value.length==0)
	{
		alert("Please Enter Shipping Description.");
		if(cond==true)
		{
			document.shipping.shipdesc.focus();
		}
		cond=false;
		return false;
	}
	if(document.shipping.sltstatus.value==2)
	{
		alert("Please Select Shipping Status.");
		if(cond==true)
		{
			document.shipping.sltstatus.focus();
		}
		cond=false;
		return false;
	}	
	if(document.shipping.shipcost.value.length==0)
	{
		alert("Please Enter Shipping Cost.");
		if(cond==true)
		{
			document.shipping.shipcost.focus();
		}
		cond=false;
		return false;
	}
	if(!IsNumeric(document.shipping.shipcost.value))
	{
		alert("Please Enter Numeric Values in Shipping Cost.");
		if(cond==true)
		{
			document.shipping.shipcost.focus();
		}
		cond=false;
		return false;
	}
	if(document.shipping.slttax.value==2)
	{
		alert("Please Select Tax.");
		if(cond==true)
		{
			document.shipping.slttax.focus();
		}
		cond=false;
		return false;
	}
	if(document.shipping.slttax.value==0)
	{
		alert("Please Select Shipping Tax.");
		if(cond==true)
		{
			document.shipping.slttax.focus();
		}
		cond=false;
		return false;
	}	
	if(document.shipping.txclass.value==0)
	{
		alert("Please Select Shipping Class.");
		if(cond==true)
		{
			document.shipping.txclass.focus();
		}
		cond=false;
		return false;
	}
}


// only insert integer no in Age field.
function IsNumeric(sText)
{
var ValidChars = "0123456789.";
var IsNumber=true;
var Char;

for (i = 0; i < sText.length && IsNumber == true; i++)
{
Char = sText.charAt(i);
if (ValidChars.indexOf(Char) == -1)
{
IsNumber = false;
}
}
return IsNumber;
}
